package com.gf.help.dao;

import java.util.List;

import com.gf.help.model.Reply;

public interface ReplyDao {
	/**
	 * 根据问题id找回答
	 * 
	 * @param questionId
	 *            问题id
	 * @param pageSize
	 *            每页大小
	 * @param currentPage
	 *            当前页
	 * @return List<Reply>
	 */
	public List<Reply> queryRepliesByQuestionId(long questionId, int pageSize,
			int currentPage);

	/**
	 * 查看总记录数
	 * 
	 * @param questionId
	 *            问题id
	 * @return int
	 */
	public int queryCountByQuestionId(long questionId);

	/**
	 * 回复
	 * 
	 * @param reply
	 * @return
	 */
	public boolean insert(long replierId, String replierName,
			long questionId, String content,String replierPortrait);

	/**
	 * 删除
	 * 
	 * @param id
	 * @return
	 */
	public boolean delete(long id);

	/**
	 * 更新
	 * 
	 * @param reply
	 * @return
	 */
	public boolean update(String content, long id);

	/**
	 * 删除回复
	 * 
	 * @param questionId
	 * @return
	 */
	public boolean deleteByQuestionId(long questionId);
}
